
#define _CRT_SECURE_NO_WARNINGS
#include"list.hpp"
#include<vector>

struct pos
{
	int x=1;
	int y=1;
};

void test01()
{
	vector<int> v = { 1,2,3,4,5,6,7,8 };
	mylist:: list<int> l2 = { 1,2,3,4,5,6,7,8 };
	mylist::list<int> l(l2);
	l.erase(l.begin(),l.end());
	mylist::list<int>::iterator it = l.begin();
	while (it != l.end())
	{
		cout << *it << endl;
		it++;
	}
}

void test02()
{
	vector<int> v = { 1,2,3,4,5,6,7,8 };
	mylist::list<int> l2 = { 1,2,3,4,5,6,7,8 };
	mylist::list<int> l = { 1,2,3,4,5,6,7,8 };
	
	//l.swap(l2);
	

	
	mylist::list<int>::reverse_iterator it = l.rbegin();
	while (it != l.rend())
	{
		(*it)+=2;
		cout << *it << endl;
		it++;
	}
}

int main()
{
	//test01();
	test02();
}